package api

import (
	"github.com/gin-gonic/gin"
	"video-software/api/handler"
)

func LoadRouster(r *gin.Engine) {
	api := r.Group("/api")
	{
		user := api.Group("/user")
		{
			user.POST("register", handler.RegisterUser)
			user.POST("login", handler.LoginUser)
			user.POST("logout", handler.LogoutUser)
		}
		barrage := api.Group("/barrage")
		{
			barrage.POST("add", handler.AddBarrage)
			barrage.GET("list", handler.ListBarrage)
			barrage.GET("finList", handler.FinListBarrage)
			barrage.POST("delete", handler.DeleteBarrage)
		}
		video := api.Group("/video")
		{
			video.POST("add", handler.AddVideo)
			video.GET("list", handler.ListVideo)
			video.GET("show", handler.ShowVideo)
		}
	}

}

//localhost
